const aqcs = [
  "作业前，制定交通组织方案（附后），并已通知相关部门或单位（监护人）",
  "作业前，在断路的路口和相关道路上设置交通警示标志，在作业区附近设置路栏、道路作业警示灯、导向标等交通警示设施（监护人）",
  "夜间作业设置警示红灯 （监护人）",
];

let formOptions = [
  {
    label: "作业申请部门",
    optionItems: [],
    prop: "jobApplyCompany",
    type: "input",
    required: true,
  },
  {
    label: "申请人",
    optionItems: [],
    prop: "sqr",
    type: "input",
    required: true,
  },
  {
    label: "涉及相关部门",
    optionItems: [],
    prop: "sjxgbm",
    type: "input",
    required: true,
  },
  {
    label: "监护人",
    optionItems: [],
    prop: "jhr",
    type: "zyry",
    required: true,
  },
  {
    label: "作业单位",
    optionItems: [],
    prop: "zydw",
    type: "input",
    required: true,
  },
  {
    label: "作业负责人",
    optionItems: [],
    prop: "zyfzr",
    type: "input",
    required: true,
  },
  {
    label: "断路原因",
    optionItems: [],
    prop: "dlyy",
    type: "input",
    required: true,
  },
  {
    label: "断路时间",
    optionItems: [],
    prop: "jobDate",
    type: "datetimerange",
    required: true,
  },
  {
    label: "断路地段示意图及相关说明",
    optionItems: [],
    prop: "syt",
    type: "file",
    required: true,
  },

  {
    label: "相关说明",
    optionItems: [],
    prop: "dlsm",
    type: "input",
    required: true,
  },

  {
    label: "签字",
    optionItems: [],
    type: "slot",
    prop: "sytqz",
    qmDt: "sytqzDt",
  },
  {
    label: "签字时间",
    optionItems: [],
    prop: "sytqzDt",
    type: "datetime",
    required: false,
  },
  {
    label: "关联的其他特殊作业及安全作业票编号",
    optionItems: [],
    prop: "glqtzyp",
    type: "glzyp",
    required: false,
  },

  {
    label: "风险辨识结果",
    optionItems: [
      {
        value: "物体打击",
        text: "物体打击",
      },
      {
        value: "机械伤害",
        text: "机械伤害",
      },
      {
        value: "起重伤害",
        text: "起重伤害",
      },
      {
        value: "触电",
        text: "触电",
      },
      {
        value: "火灾",
        text: "火灾",
      },
      {
        value: "高处坠落",
        text: "高处坠落",
      },

      {
        value: "灼烫",
        text: "灼烫",
      },
      {
        value: "坍塌",
        text: "坍塌",
      },
      {
        value: "其他爆炸",
        text: "其他爆炸",
      },
      {
        value: "中毒窒息",
        text: "中毒窒息",
      },

      {
        value: "其他风险",
        text: "其他风险",
      },
    ],
    prop: "risk",
    type: "checkbox",
    required: false,
  },
];
aqcs.forEach((item, index) => {
  formOptions.push({
    label: `${index + 1}.${item}`,
    optionItems: [
      {
        value: "是",
        text: "涉及",
      },
      {
        value: "否",
        text: "不涉及",
      },
    ],
    prop: `yesOrNo${index + 1}`,
    type: "labelradio",
    required: false,
  });
  // formOptions.push({
  //   label: "电子签名",
  //   optionItems: [],
  //   type: "slot",
  //   // prop: `qianming${index + 1}`,
  //   prop: `qianming1`,
  // });
});
formOptions = [
  ...formOptions,
  // {
  //   label: "电子签名",
  //   optionItems: [],
  //   type: "slot",
  //   // prop: `qianming${index + 1}`,
  //   prop: `qianming1`,
  // },
  {
    label: "其他安全措施",
    optionItems: [],
    prop: "qtaqcs",
    type: "qtaqcs",
    multiple: true,
  },
  {
    label: "编制人",
    optionItems: [],
    prop: "bzr",
    type: "input",
    required: false,
  },
  {
    label: "安全措施电子签名",
    optionItems: [],
    prop: "qianming1",
    type: "slot",
    required: false,
  },
  {
    label: "安全交底人",
    optionItems: [],
    prop: "aqjdr",
    type: "slot",
    required: false,
  },
  {
    label: "接受交底人",
    optionItems: [],
    prop: "jsjdr",
    type: "slot",
    required: false,
  },
  // {
  //   label: "",
  //   optionItems: [],
  //   prop: "jsjdr2",
  //   type: "slot",
  //   required: false,
  // },
  // {
  //   label: "",
  //   optionItems: [],
  //   prop: "jsjdr3",
  //   type: "slot",
  //   required: false,
  // },
];
const yjList = [
  "作业负责人意见（签字）",
  "所在单位(部门)意见（签字）",
  "安保部审批意见（签名）",
  "完工验收（签字）",
];
yjList.forEach((item, index) => {
  let qianzhi = index === 0 ? null : "qianmingDt" + index;
  if (index === 3) {
    qianzhi = ["yjqm3", "qianming1", "aqjdr", "sytqz"];
  }
  formOptions.push({
    label: item,
    optionItems: [],
    type: "slot",
    prop: `yjqm` + (index + 1),
    qmDt: "qianmingDt" + (index + 1),
    qianzhi,
  });
  formOptions.push({
    label: "签名日期",
    optionItems: [],
    prop: "qianmingDt" + (index + 1),
    type: "datetime",
    required: false,
  });
});
const longLabelSlots = [
  "yesOrNo1",
  "yesOrNo2",
  "yesOrNo3",
  "yesOrNo4",
  "yesOrNo5",
  "yesOrNo6",
  "yesOrNo7",
  "yesOrNo8",
  "yesOrNo9",
  "yesOrNo10",
  "yesOrNo11",
  "yesOrNo12",
  "yesOrNo13",
  "yesOrNo14",
  "yesOrNo15",
];
const qianmingSlots = [
  "qianming1",
  "qianming2",
  "qianming3",
  "qianming4",
  "qianming5",
  "qianming6",
  "qianming7",
  "qianming8",
  "qianming9",
  "qianming10",
  "qianming11",
  "qianming12",
  "qianming13",
  "qianming14",
  "qianming15",
  "qianming16",
  "qianming17",
  "qianming18",
  "sytqz",
  "yjqm1",
  "yjqm2",
  "yjqm3",
  "yjqm4",
  "yjqm5",
  "yjqm6",
  "yjqm7",
  "yjqm8",
  "aqjdr",
  "otherqm",
  "jsjdr",
  "jsjdr2",
  "jsjdr3",
  "bmjhr",
  "fhjhr",
];
const emptys = [
  "qianming1",
  "yjqm1",
  "yjqm2",
  "yjqm3",
  "yjqm4",
  "qianmingDt1",
  "qianmingDt2",
  "qianmingDt3",
  "qianmingDt4",
  "aqjdr",
  "jsjdr",
  "jsjdr2",
  "jsjdr3",
  "bmjhr",
  "fhjhr",
  "otherqm",
  "jobApplyDate",
  "jobDate",
  "glqtzyp",
  "sytqz",
  "sytqzDt",
];
const options = {
  formOptions,
  longLabelSlots,
  qianmingSlots,
  emptys,
};
export default options;
